import { post } from '@/utils/ajax'

// 查询列表
export function search(query, server_tag) {
    return post('/conn/jms/datasource/search', query, { headers: { "Anvil-Server-Tag": server_tag } });
}
// 新增
export function insert(params) {
    return post('/conn/jms/datasource/insert', params);
}
// 删除
export function deleteByIds(ids) {
  return post('/conn/jms/datasource/deleteByIds',{ids});
}
// 更新
export function updateById(params) {
    return post('/conn/jms/datasource/updateRowNotNullById', params);
}
// 根据ID获取
export function selectById(id) {
    return post('/conn/jms/datasource/selectById', { id });
}
// 重新加载
export function reload(id, server_tag) {
    return post('/conn/jms/datasource/reload/' + id, {}, { headers: { "Anvil-Server-Tag": server_tag } });
}
// 卸载
export function unload(id, server_tag) {
    return post('/conn/jms/datasource/unload/' + id, {}, { headers: { "Anvil-Server-Tag": server_tag } });
}